//
//  VideoPlayViewController.swift
//  视频悬浮框Swift
//
//  Created by 解楚豪 on 2018/9/18.
//  Copyright © 2018年 xch. All rights reserved.
//

import UIKit

typealias videoBlock = ()->Void

class VideoPlayViewController: UIViewController {

    @IBOutlet weak var videoView: UIView!
    var videoUrl:String?
    
    var videodis:videoBlock?
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        let video = XCHVideoView.init(videoUrl!,videoView.bounds)
        videoView.addSubview(video)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    var xchBLock:(()->Void)?
    
    var names:[String] = ["asg","abc"]
    
    func abcderf(abcd:()->Void) {
        
        
    }
    

    
    @IBAction func backAction(_ sender: Any) {
        
        abcderf {
            
        }
        if xchBLock != nil {
            xchBLock!()
        }
        
//        if videodis != nil {
//            videodis!()
//        }
        self.dismiss(animated: true, completion: nil)
    }
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
